﻿@model FooterModel
@using Giant.Core
@using Giant.Core.Infrastructure
@using Giant.Web.Models.Common;
<div class="footer">
    <div class="footer-upper">
        <div class="footer-block information">
            <div class="title">
                <strong>@T("Footer.Information")</strong>
            </div>
            <ul class="list">
                @if (Model.SitemapEnabled)
                {
                    <li><a href="@Url.RouteUrl("Sitemap")">@T("Sitemap")</a></li>
                }
                @foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn1).ToList())
                {
                    <li><a href="@Url.RouteUrl("Topic", new { SeName = topic.SeName })">@topic.Name</a></li>
                }
                <li><a href="@Url.RouteUrl("ContactUs")">@T("ContactUs")</a></li>
            </ul>
        </div>
        <div class="footer-block user-service">
            <div class="title">
                <strong>@T("Footer.UserService")</strong>
            </div>
            <ul class="list">
                @if (Model.NewsEnabled)
                {
                    <li><a href="@Url.RouteUrl("NewsArchive")">@T("News")</a></li>
                }
                @foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn2).ToList())
                {
                    <li><a href="@Url.RouteUrl("Topic", new { SeName = topic.SeName })">@topic.Name</a></li>
                }
            </ul>
        </div>
        <div class="footer-block my-account">
            <div class="title">
                <strong>@T("Footer.MyAccount")</strong>
            </div>
            <ul class="list">
                <li><a href="@Url.RouteUrl("UserInfo")">@T("Account.MyAccount")</a></li>
              
                @foreach (var topic in Model.Topics.Where(x => x.IncludeInFooterColumn3).ToList())
                {
                    <li><a href="@Url.RouteUrl("Topic", new { SeName = topic.SeName })">@topic.Name</a></li>
                }
            </ul>
        </div>
        <div class="footer-block follow-us">            
            @Html.Action("NewsletterBox", "Newsletter")
        </div>
    </div>
    <div class="footer-lower">
        <div class="footer-info">
            <span class="footer-disclaimer">@T("Content.CopyrightNotice", DateTime.Now.Year, Model.SiteName)</span>
           
        </div>
        @if (!Model.HidePoweredByGiantSoft)
        {
            <div class="footer-powered-by">
                Powered by <a href="http://www.giantsoft.cn/">GiantSoft</a>
            </div>
        }
        @Html.Action("SiteThemeSelector", "Common")
    </div>
    @Html.Widget("footer")
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $('.footer-block .title').click(function () {
            var e = window, a = 'inner';
            if (!('innerWidth' in window)) {
                a = 'client';
                e = document.documentElement || document.body;
            }
            var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
            if (result.width < 769) {
                $(this).siblings('.list').slideToggle('slow');
            }
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $('.block .title').click(function () {
            var e = window, a = 'inner';
            if (!('innerWidth' in window)) {
                a = 'client';
                e = document.documentElement || document.body;
            }
            var result = { width: e[a + 'Width'], height: e[a + 'Height'] };
            if (result.width < 1001) {
                $(this).siblings('.listbox').slideToggle('slow');
            }
        });
    });
</script>